﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="Sinacor.OMM.Deployment.Setup.Conexao"
	x:Name="Window"
	Title="Conexão com banco de dados Oracle"
	Width="800" 
	Height="600" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d" 
	Background="#FF313131"
    Closing="Window_Closing" Loaded="Window_Loaded">
    <Window.Resources>
        <Storyboard x:Key="Loader01" 
					RepeatBehavior="Forever">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
										   Storyboard.TargetName="loader01" 
										   Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" 
								 	  Value="5.172"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
										   Storyboard.TargetName="loader01" 
										   Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" 
									  Value="-5.172"/>
            </DoubleAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" 
										  Storyboard.TargetName="loader01" 
										  Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:01" 
									 Value="#00FFFFFF"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Loader02" 
					RepeatBehavior="Forever"/>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Loader01}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Loader02}"/>
        </EventTrigger>
    </Window.Triggers>
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource=".\images\setupTelas.png" 
						Opacity="1"/>
        </Grid.Background>
        <Grid Margin="221,14,0,0" 
			  VerticalAlignment="Top" 
			  Width="348" 
			  Height="82" 
			  HorizontalAlignment="Left">
            <Grid.Background >
                <ImageBrush ImageSource=".\images\LogoSinacor.png" 
							Opacity="1" 
							Stretch="UniformToFill"/>
            </Grid.Background>
        </Grid>
        <Label HorizontalAlignment="Left" 
			   VerticalAlignment="Top" 
			   Content="Conexão com Banco de Dados" 
			   FontSize="24" 
			   FontWeight="Bold" 
			   Background="#00336699" 
			   Foreground="#FF336699" 
			   Margin="42.5,158,0,0"/>
        <TextBlock HorizontalAlignment="Left" 
				   Margin="48,211,0,0" 
				   VerticalAlignment="Top" 
				   Height="37" 
				   TextWrapping="Wrap" Text="Informe o Banco de Dados que será utilizado com o Sistema."/>
        <GroupBox VerticalAlignment="Top" 
				  Header="Banco de Dados" 
				  Height="94" 
				  Margin="48,253,48,0" 
				  Background="#59FFFFFF" 
				  Opacity="1" 
				  BorderThickness="1,1,1,1" 
				  BorderBrush="#FF336699">
            <Grid Name="GridPrincipal">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.38*"/>
                    <ColumnDefinition Width="0.62*"/>
                </Grid.ColumnDefinitions>
                <Label HorizontalAlignment="Left" 
					   VerticalAlignment="Top" 
					   Content="Usuário" 
					   Margin="8,8,0,0" 
					   Width="49.073" 
					   HorizontalContentAlignment="Right" VerticalContentAlignment="Bottom"/>
                <Ellipse 
						 Margin="128.197,47,0,0" Visibility="Hidden" Fill="#FF336699" Stroke="{x:Null}" StrokeThickness="3" x:Name="loader01" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Top" Height="4.554" Width="4.554" HorizontalAlignment="Left" Grid.Column="1">
                    <Ellipse.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="-1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Ellipse.RenderTransform>
                </Ellipse>
                <Label HorizontalAlignment="Left" 
					   VerticalAlignment="Top" 
					   Content="Senha" 
					   Margin="8,35.277,0,0"
					   Width="49.073" 
					   HorizontalContentAlignment="Right" d:LayoutOverrides="Height" VerticalContentAlignment="Bottom"/>
                <Label Foreground="#FF666666" 
					   Margin="143,35.277,0,0"  Name="lblTestingConnection" Visibility="Hidden"
					   Content="Testando Conexão..." d:LayoutOverrides="Height" VerticalAlignment="Top" Width="132" HorizontalAlignment="Left" Grid.Column="1"/>
                <Label Foreground="#FFD13E3E" 
					   Margin="143,35.278,0,0" 
					   Content="Falha na Conexão." 
					   Background="#00FF0000" Name="lblConnectionNOK" Visibility="Hidden"
					   d:LayoutOverrides="Height" VerticalAlignment="Top" Width="101" HorizontalAlignment="Left" Grid.Column="1"/>
                <Label Foreground="#FF1E8D12" 
					   Margin="143,35.278,0,0" 
					   Content="Conexão efetuada com sucesso. Selecione a Empresa." Name="lblConnectionOK" Visibility="Hidden"
					   Background="#00FFFFFF" d:LayoutOverrides="Height" Width="273" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1"/>
                <TextBox VerticalAlignment="Top" Text="" TextWrapping="Wrap" Margin="61.073,12,78.927,0" BorderBrush="#FF336699" BorderThickness="1,1,1.2,1" Name="txtUser" MaxLength="15" CharacterCasing="Upper" />
                <PasswordBox PasswordChar="*"  Margin="61.073,0,79.927,18" VerticalAlignment="Bottom" BorderBrush="#FF336699" BorderThickness="1,1,1.2,1" d:LayoutOverrides="Height" Name="txtPassword" MaxLength="15" Height="18"></PasswordBox>
                <Label HorizontalAlignment="Right" 
					VerticalAlignment="Top" 
					Content="TNS" 
					Margin="0,8,10.927,0"
					Width="49.073" 
					HorizontalContentAlignment="Right" d:LayoutOverrides="VerticalAlignment, Height" VerticalContentAlignment="Bottom"/>
                <ComboBox IsSynchronizedWithCurrentItem="True" Name="cbTNS"  Margin="247.673,9,302.327,0" VerticalAlignment="Top" Height="20" BorderThickness="0,0,0,0" Style="{DynamicResource ComboBoxSetupOMM}" Grid.ColumnSpan="2" SelectionChanged="cbTNS_SelectionChanged" />
                <Button 
					Margin="143,8,0,0" 
					VerticalAlignment="Top" 
					Content="Testar" 
					Background="#FF2B4D83" 
					Foreground="#FFFFFFFF" Width="60" HorizontalAlignment="Left" d:LayoutOverrides="Height" Grid.Column="1" Name="btnTestConnection" Click="btnTestConnection_Click" />
                <Label 
					Content="Empresa" 
					Margin="0,35.278,10.927,0" 
					HorizontalContentAlignment="Right" VerticalContentAlignment="Bottom" HorizontalAlignment="Right" Width="54.073" d:LayoutOverrides="Height" VerticalAlignment="Top"/>
                <ComboBox IsSynchronizedWithCurrentItem="True" Name="cbFirm" IsEnabled="False" Margin="247.673,0,302.327,16" VerticalAlignment="Bottom" Height="20" BorderThickness="0,0,0,0" Style="{DynamicResource ComboBoxSetupOMM}" SelectionChanged="cbFirm_SelectionChanged" Grid.ColumnSpan="2" />
                <Path Stretch="Fill"
					StrokeStartLineCap="Square"
					StrokeEndLineCap="Square"
					StrokeMiterLimit="2.75"
					Stroke="#FF567661"
					Data="F1 M 164.292,93.3646C 167.053,93.3646 169.292,95.6032 169.292,98.3646C 169.292,101.126 167.053,103.365 164.292,103.365C 161.53,103.365 159.292,101.126 159.292,98.3646C 159.292,95.6032 161.53,93.3646 164.292,93.3646 Z "
					HorizontalAlignment="Left"
					Margin="126,43.054,0,0"
					Width="11"
					x:Name="ledConnectionOK" 
					Height="11" 
					VerticalAlignment="Top" Grid.Column="1" Visibility="Hidden">
                    <Path.Fill>
                        <LinearGradientBrush StartPoint="0.525,0.9375"
							EndPoint="0.525,0.0875">
                            <GradientStop Color="#FFE3F237"
								Offset="0"/>
                            <GradientStop Color="#FF9AD23C"
								Offset="0.269767"/>
                            <GradientStop Color="#FF52B342"
								Offset="0.488372"/>
                            <GradientStop Color="#FF6FC175"
								Offset="0.832558"/>
                            <GradientStop Color="#FF8DCFA9"
								Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path Stretch="Fill"
					StrokeStartLineCap="Square"
					StrokeEndLineCap="Square"
					StrokeMiterLimit="2.75"
					Stroke="#FF567661"
					Data="F1 M 164.292,93.3646C 167.053,93.3646 169.292,95.6032 169.292,98.3646C 169.292,101.126 167.053,103.365 164.292,103.365C 161.53,103.365 159.292,101.126 159.292,98.3646C 159.292,95.6032 161.53,93.3646 164.292,93.3646 Z "
					Margin="126,43.054,0,0"
					x:Name="ledConnectionNOK"
					Width="11"
					HorizontalAlignment="Left" 
					Height="11" 
					VerticalAlignment="Top" Grid.Column="1" Visibility="Hidden">
                    <Path.Fill>
                        <LinearGradientBrush StartPoint="0.525,0.9375"
							EndPoint="0.525,0.0875">
                            <GradientStop Color="#FF8E1111"
								Offset="0"/>
                            <GradientStop Color="#FFD23C3C"
								Offset="0.465"/>
                            <GradientStop Color="#FFEA6262"
								Offset="0.845"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
            </Grid>
        </GroupBox>
        <Grid Margin="187,362,188,0" 
			  VerticalAlignment="Top" 
			  Height="175" 
			  HorizontalAlignment="Stretch" Width="417">
            <Grid.Background >
                <ImageBrush ImageSource=".\images\Conexoes.png" 
							Opacity="1" 
							Stretch="UniformToFill"/>
            </Grid.Background>
        </Grid>
        <Button HorizontalAlignment="Right" 
				Content="Avançar" 
				Margin="0,0,48,18" 
				VerticalAlignment="Bottom" 
				Width="60" 
				Background="#FF2B4D83" 
				Foreground="#FFFFFFFF" Name="btnNext" IsEnabled="True" Click="btnNext_Click" Visibility="Hidden" />
        <Button HorizontalAlignment="Right" 
				Margin="0,0,112.113,18" 
				VerticalAlignment="Bottom" 
                Name="btnBack"
				Content="Voltar" 
				Width="60" 
				Background="#FF2B4D83" 
				Foreground="#FFFFFFFF" Click="btnBack_Click" />
    </Grid>
</Window>
